<template>
  <div class="header_top">
    <div class="top_content flex justify-between">
      <div class="top_content_left">
        <div class="unlogin" style="color: rgb(255, 255, 255)">
          <div class="login-txt pointer" style="margin-right: 17px">
            {{ t('welcome') }}
            <span class="top-text" @click="goUrl('/#/register')">{{ t('supplierRegister') }} ></span>
          </div>
        </div>
      </div>
      <div class="top_content_right flex">
        <EMenu :menu-list="menuList" />
      </div>
    </div>
  </div>
</template>

<script setup>
import { notLoginMenu } from './config'
import EMenu from './e-menu.vue'

const runtimeConfig = useRuntimeConfig()
const { t } = useI18n()
const menuList = computed(() => [...notLoginMenu(t)])
const goUrl = (url) => {
  window.open(`${runtimeConfig.public.HTTPS}${runtimeConfig.public.SUP_URL}${url}`, '_blank')
}
</script>

<style lang="scss" scoped>
.header_top {
  width: 100%;
  height: 30px;
  background-color: #004898;
  position: relative;
  .top_content {
    min-width: 1200px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 10px;
    line-height: 30px;
    font-size: 12px;
    .top-text {
      cursor: pointer;
      margin-left: 10px;
    }
  }
}
</style>
